<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>OAuthProvider 类</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="oauth.setversion.html">« OAuth::setVersion</a></li>
      <li style="float: right;"><a href="oauthprovider.addrequiredparameter.html">OAuthProvider::addRequiredParameter »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.oauth.html">OAuth</a></li>
    <li>OAuthProvider 类</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.oauthprovider" class="reference">

 <h1 class="title">OAuthProvider 类</h1>
 

 <div class="partintro"><p class="verinfo">(PECL OAuth &gt;= 1.0.0)</p>


  <div class="section" id="oauthprovider.intro">
   <h2 class="title">简介</h2>
   <p class="para">
   管理一个  OAuth 提供者类。
   </p>
   <p class="para">
    参考一个外部的深入教程 <a href="http://toys.lerdorf.com/archives/55-Writing-an-OAuth-Provider-Service.html" class="link external">&raquo;&nbsp;写一个 OAuth 提供者服务</a>，用来亲自实践提供服务。也可以参考 OAuth 扩展源代码里的 <a href="https://svn.php.net/viewvc/pecl/oauth/trunk/examples" class="link external">&raquo;&nbsp;OAuth 提供者例子</a> 。
   </p>
  </div>


  <div class="section" id="oauthprovider.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">OAuthProvider</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.addrequiredparameter.html" class="methodname">addRequiredParameter</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$req_params</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.callconsumerhandler.html" class="methodname">callconsumerHandler</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.calltimestampnoncehandler.html" class="methodname">callTimestampNonceHandler</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.calltokenhandler.html" class="methodname">calltokenHandler</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.checkoauthrequest.html" class="methodname">checkOAuthRequest</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$method</code><span class="initializer"> = ?</span></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$params_array</code><span class="initializer"> = ?</span></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.consumerhandler.html" class="methodname">consumerHandler</a></span>(<span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$callback_function</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="oauthprovider.generatetoken.html" class="methodname">generateToken</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$size</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$strong</code><span class="initializer"> = false</span></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.is2leggedendpoint.html" class="methodname">is2LeggedEndpoint</a></span>(<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$params_array</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.isrequesttokenendpoint.html" class="methodname">isRequestTokenEndpoint</a></span>(<span class="methodparam"><span class="type">bool</span> <code class="parameter">$will_issue_request_token</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.removerequiredparameter.html" class="methodname">removeRequiredParameter</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$req_params</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="oauthprovider.reportproblem.html" class="methodname">reportProblem</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$oauthexception</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$send_headers</code><span class="initializer"> = true</span></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.setparam.html" class="methodname">setParam</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$param_key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$param_val</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.setrequesttokenpath.html" class="methodname">setRequestTokenPath</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.timestampnoncehandler.html" class="methodname">timestampNonceHandler</a></span>(<span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$callback_function</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="oauthprovider.tokenhandler.html" class="methodname">tokenHandler</a></span>(<span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$callback_function</code></span>): <span class="type"><span class="type void">void</span></span></div>

   }</div>


  </div>

 </div>

 

















































































































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="oauthprovider.addrequiredparameter.html">OAuthProvider::addRequiredParameter</a> — 添加必需的参数</li><li><a href="oauthprovider.callconsumerhandler.html">OAuthProvider::callconsumerHandler</a> — 调用 consumerNonceHandler 回调函数</li><li><a href="oauthprovider.calltimestampnoncehandler.html">OAuthProvider::callTimestampNonceHandler</a> — 调用 timestampNonceHandler 回调函数</li><li><a href="oauthprovider.calltokenhandler.html">OAuthProvider::calltokenHandler</a> — 调用 tokenNonceHandler 回调函数</li><li><a href="oauthprovider.checkoauthrequest.html">OAuthProvider::checkOAuthRequest</a> — 检查一个 oauth 请求</li><li><a href="oauthprovider.construct.html">OAuthProvider::__construct</a> — 新建一个  OAuthProvider 对象</li><li><a href="oauthprovider.consumerhandler.html">OAuthProvider::consumerHandler</a> — 设置 consumerHandler 句柄回调函数</li><li><a href="oauthprovider.generatetoken.html">OAuthProvider::generateToken</a> — 生成一个随机令牌</li><li><a href="oauthprovider.is2leggedendpoint.html">OAuthProvider::is2LeggedEndpoint</a> — is2LeggedEndpoint</li><li><a href="oauthprovider.isrequesttokenendpoint.html">OAuthProvider::isRequestTokenEndpoint</a> — 设置 isRequestTokenEndpoint</li><li><a href="oauthprovider.removerequiredparameter.html">OAuthProvider::removeRequiredParameter</a> — 移除一个必需的参数</li><li><a href="oauthprovider.reportproblem.html">OAuthProvider::reportProblem</a> — 报告问题</li><li><a href="oauthprovider.setparam.html">OAuthProvider::setParam</a> — 设置一个参数</li><li><a href="oauthprovider.setrequesttokenpath.html">OAuthProvider::setRequestTokenPath</a> — 设置请求令牌路径</li><li><a href="oauthprovider.timestampnoncehandler.html">OAuthProvider::timestampNonceHandler</a> — 设置 timestampNonceHandler 句柄回调函数</li><li><a href="oauthprovider.tokenhandler.html">OAuthProvider::tokenHandler</a> — 设置 tokenHandler 句柄回调函数</li></ul>
</div>
</div></div></body></html>